Matthias Clasen [Mon, 10 Feb 2020 19:59:40 +0000 (14:59 -0500)]
calendar: Fix mismatches with GDateTime
GDatetime uses 1-based month and day numbers, whereas
GktCalendars are 0-based. Correct for this.
Matthias Clasen [Mon, 10 Feb 2020 19:14:18 +0000 (14:14 -0500)]
Calendar: Make year/month/day writable again
Our a11y tests were relying on this.
Matthias Clasen [Mon, 10 Feb 2020 18:55:37 +0000 (13:55 -0500)]
testsuite: Update expected output
The output for combo boxes in a11y tests has changed
because they use popovers now.
Matthias Clasen [Mon, 10 Feb 2020 15:57:54 +0000 (15:57 +0000)]
Merge branch 'fix-gestures-test' into 'master'
Fix gestures test
See merge request GNOME/gtk!1406
Alexander Larsson [Mon, 10 Feb 2020 15:24:03 +0000 (16:24 +0100)]
Fix gestures test
This tests was testing gestures by faking an event in the
middle of a window that has a hbox with an expanding image in it.
For me (and I guess this depends on all sorts of issues like whether
CSD is enabled, font sizes, etc) the hbox ended up centered horizontally
but not vertically (probably because of csd at the top), so no events
ever hit the inner widgets.
This is fixed by emitting the events at allocation.x/y of the
hbox, which should contain both the hbox and the image (as it expands).
Matthias Clasen [Mon, 10 Feb 2020 15:08:51 +0000 (15:08 +0000)]
Merge branch 'fix-hidpi-popups' into 'master'
Fix popup placement on hidpi multi-monitor
See merge request GNOME/gtk!1405
Alexander Larsson [Mon, 10 Feb 2020 14:19:32 +0000 (15:19 +0100)]
hidpi: Rescan monitors when screen scale factor changes
All the code in e.g. init_randr15() divides the physical resolutions with
the screen scale, however if we get the screen scale from xsettings
rather than e.g. GDK_SCALE the initial setup is using the wrong value.
So, whenever the screen scale size is changed we need to trigger
a re-read of the randr data
Matthias Clasen [Mon, 10 Feb 2020 14:32:09 +0000 (14:32 +0000)]
Merge branch 'mainloop-cleanup' into 'master'
Mainloop cleanup
See merge request GNOME/gtk!1404
Matthias Clasen [Mon, 10 Feb 2020 13:13:23 +0000 (08:13 -0500)]
More updates
Alexander Larsson [Mon, 10 Feb 2020 12:45:56 +0000 (12:45 +0000)]
Merge branch 'icon-theme-api-rework' into 'master'
Icon theme api rework
See merge request GNOME/gtk!1390
Alexander Larsson [Mon, 10 Feb 2020 12:30:57 +0000 (13:30 +0100)]
Fix typo in GtkIconPaintable is-symbolic property
Alexander Larsson [Mon, 10 Feb 2020 12:12:26 +0000 (13:12 +0100)]
icon-theme: Add back and fix test for handling non-square icons
We test this by looking at the produced render nodes now that
we don't actualluy scale the icon. Also, it turns out that this
code was broken due to some typos, so we also fix those.
Alexander Larsson [Mon, 10 Feb 2020 11:57:27 +0000 (12:57 +0100)]
Expose gtk_icon_paintable_new_for_file
Alexander Larsson [Mon, 10 Feb 2020 11:51:27 +0000 (12:51 +0100)]
GtkIconPaintable: Add properties for file, icon-name and is-symbolic
Matthias Clasen [Mon, 10 Feb 2020 12:07:18 +0000 (12:07 +0000)]
Merge branch 'baselineoverlay' into 'master'
A baseline overlay
See merge request GNOME/gtk!840
Alexander Larsson [Mon, 10 Feb 2020 11:33:17 +0000 (12:33 +0100)]
icon paintable: Replace get_filename and get_resource_path with get_file()
This returns a GFile which can represent both the above.
Alexander Larsson [Mon, 10 Feb 2020 10:43:47 +0000 (11:43 +0100)]
Rename GTK_ICON_LOOKUP_LOAD_IN_THREAD to GTK_ICON_LOOKUP_PRELOAD
Alexander Larsson [Mon, 10 Feb 2020 10:40:00 +0000 (11:40 +0100)]
icontheme: Always return some icon name in get_icon_name() for lookup results
If you called gtk_icon_theme_lookup(), then always return some useful
icon name from gtk_icon_paintable_get_icon_name(), even if we picked
an unthemed icon.
Also rewrite the gtk_icon_paintable_get_icon_name() docs to make this
clearer.
Matthias Clasen [Mon, 13 May 2019 17:43:44 +0000 (17:43 +0000)]
Remove GTK_DEBUG=baselines
This has been reimplemented differently
in the inspector.
Matthias Clasen [Mon, 13 May 2019 17:42:20 +0000 (17:42 +0000)]
widget: Stop embedding baseline debugging
The inspector has an overlay that achieves the
same, in a cleaner way.
Matthias Clasen [Mon, 13 May 2019 17:36:46 +0000 (17:36 +0000)]
inspector: Draw baselines as an overlay
Matthias Clasen [Mon, 10 Feb 2020 04:40:02 +0000 (23:40 -0500)]
Remove unused includes
We eventually want to get rid of GtkSelectionData.
As a first step, stop including gtkselection.h unnecessarily.
Matthias Clasen [Mon, 10 Feb 2020 03:47:25 +0000 (22:47 -0500)]
docs: Mention gtk_main in the migration guide
Matthias Clasen [Mon, 10 Feb 2020 03:37:18 +0000 (22:37 -0500)]
Drop gtk_get_main_thread
This is not a very useful api, and if you need it,
you can just as easily keep track yourself which thread
called gtk_init().
Matthias Clasen [Mon, 10 Feb 2020 03:33:02 +0000 (22:33 -0500)]
Drop gtk_main and gtk_main_quit
The alternatives are to use GtkApplication,
or use GMainContext.
Matthias Clasen [Mon, 10 Feb 2020 03:41:58 +0000 (22:41 -0500)]
docs: Update an example
Don't use gtk_main() in the mainloop example.
It is going away.
Matthias Clasen [Mon, 10 Feb 2020 03:24:47 +0000 (22:24 -0500)]
Stop using gtk_main and gtk_main_quit
Replace these calls with direct use of GMainContext api.
Matthias Clasen [Mon, 10 Feb 2020 01:06:58 +0000 (20:06 -0500)]
Stop using gtk_main_quit
Stop using gtk_main and gtk_main_quit in tests and
examples. These APIs are on the way out.
Matthias Clasen [Mon, 10 Feb 2020 00:42:11 +0000 (19:42 -0500)]
Drop gtk_main_level
This api isn't useful without gtk_main, which is also
on the way out.
Matthias Clasen [Mon, 10 Feb 2020 00:38:40 +0000 (19:38 -0500)]
Drop gtk_main_iteration
This function and its cousin, gtk_main_iteration_do, are
thin wrappers around GMainContext api that should just
be used directly.
Matthias Clasen [Mon, 10 Feb 2020 00:34:02 +0000 (19:34 -0500)]
Drop gtk_events_pending
This was just a thin wrapper around gtk_main_context_pending,
which should be used directly instead.
Matthias Clasen [Mon, 10 Feb 2020 00:29:16 +0000 (19:29 -0500)]
tests: Stop using gtk_events_pending
Just use the GMainContext api directly.
Matthias Clasen [Mon, 10 Feb 2020 00:27:59 +0000 (19:27 -0500)]
win32 printing: Stop using gtk_events_pending
Just use the GMainContext API directly.
Matthias Clasen [Mon, 10 Feb 2020 04:04:10 +0000 (23:04 -0500)]
win32: One more build fix
Matthias Clasen [Mon, 10 Feb 2020 03:58:53 +0000 (22:58 -0500)]
win32: Fix the build
Matthias Clasen [Mon, 10 Feb 2020 03:55:11 +0000 (03:55 +0000)]
Merge branch 'main-cleanup' into 'master'
Cleanup in gtkmain.h
See merge request GNOME/gtk!1403
Benjamin Otte [Sun, 26 Aug 2018 16:00:52 +0000 (18:00 +0200)]
filechooser: Remove outdated hack
In GTK2, the filechooser was using a Paned, so switching between sidebar
and files list with the arrow keys didn't work (the slider would be
selected instead). So in
https://bugzilla.gnome.org/show_bug.cgi?id=161489 a crude hack was added
to make this possible.
Over the years the filechooser code has changed so that it now would do
this by default, yet the hack had been retained.
Benjamin Otte [Mon, 20 Aug 2018 04:20:05 +0000 (06:20 +0200)]
gdk: Make gdk_keyval_name() return a const char
The string is const, so return it like that.
Matthias Clasen [Sun, 9 Feb 2020 21:49:53 +0000 (16:49 -0500)]
Remove unused include
Emmanuele Bassi [Thu, 6 Feb 2020 15:02:02 +0000 (15:02 +0000)]
cssprovider: Remove unused include
Matthias Clasen [Sun, 9 Feb 2020 16:00:53 +0000 (11:00 -0500)]
Remove gtk_propagate_event from public API
This is not a function that can be safely called
outside of GTK.
Matthias Clasen [Sun, 9 Feb 2020 15:55:56 +0000 (10:55 -0500)]
Remove gtk_main_do_event from public API
Matthias Clasen [Sun, 9 Feb 2020 15:55:37 +0000 (10:55 -0500)]
Remove gtk_main_do_event from the docs
Matthias Clasen [Sun, 9 Feb 2020 15:54:26 +0000 (10:54 -0500)]
testsuite: Stop using gtk_main_do_event
Instead, emit ::event on the surface. Neither of
these is a proper test api, but one works as well
as the other.
Matthias Clasen [Sun, 9 Feb 2020 15:45:33 +0000 (10:45 -0500)]
docs: Remove more mentions of gtk_main_do_event
Matthias Clasen [Sun, 9 Feb 2020 15:38:01 +0000 (10:38 -0500)]
docs: Remove a reference to gtk_main_do_event
It is not great to put a function in the public api and
document it as "do not call this" only so we can refer
to its docs in other places. Therefore, fold the docs
directly into the input handling overview chapter.
Matthias Clasen [Sun, 9 Feb 2020 15:37:24 +0000 (10:37 -0500)]
docs: Remove a mention of gtk_main_do_event
Matthias Clasen [Sun, 9 Feb 2020 15:23:27 +0000 (10:23 -0500)]
css: Add a comment
All the other color values have this comment,
best to be consistent.
Matthias Clasen [Sun, 9 Feb 2020 15:03:44 +0000 (15:03 +0000)]
Merge branch 'wip/baedert/remove-outline-properties' into 'master'
css: Remove outline border radius properties
Closes #2414
See merge request GNOME/gtk!1402
Matthias Clasen [Sun, 9 Feb 2020 00:40:56 +0000 (19:40 -0500)]
gsk: Update docs sections
Matthias Clasen [Sun, 9 Feb 2020 00:36:25 +0000 (19:36 -0500)]
gsk: Small documentation additions
Matthias Clasen [Sun, 9 Feb 2020 00:27:32 +0000 (19:27 -0500)]
Fix a doc comment
Signals take two colons.
Matthias Clasen [Sun, 9 Feb 2020 00:25:13 +0000 (19:25 -0500)]
docs: Drop a few no longer existing symbols
Matthias Clasen [Sun, 9 Feb 2020 00:22:23 +0000 (19:22 -0500)]
docs: Update the switch thumbnail
Make the thumbnail for switches reflect the
current appearance of this widget.
Matthias Clasen [Sun, 9 Feb 2020 00:21:57 +0000 (19:21 -0500)]
emojichooser: Fix the docs
Make the emojichooser show up in the docs.
Matthias Clasen [Sun, 9 Feb 2020 00:04:19 +0000 (19:04 -0500)]
Fix the build with -Dgtk_doc=true
We need to export the emoji chooser symbols to
really make it public api.
Matthias Clasen [Sun, 9 Feb 2020 00:02:46 +0000 (19:02 -0500)]
Fix build with -Dgtk_doc=true
Toolbars were removed, so don't try to create
thumbnails of them.
Timm Bäder [Sat, 8 Feb 2020 19:39:08 +0000 (20:39 +0100)]
css: Remove outline border radius properties
These are always set to the same value as the corresponding border
radius properties. They are also non-standard, so remove them and
replace them with the border radius properties everywhere.
Fixes #2414
Matthias Clasen [Sat, 8 Feb 2020 15:44:16 +0000 (15:44 +0000)]
Merge branch 'avoid-mime-sniffing' into 'master'
Avoid mime sniffing where possible
See merge request GNOME/gtk!1400
Matthias Clasen [Sat, 8 Feb 2020 15:22:54 +0000 (10:22 -0500)]
Avoid mime sniffing where possible
When we are loading symbolic pngs or svgs, we know
that we need to the png or svg loader, so there is
no need to go through (surprisingly expensive) mime
sniffing to find the right loader.
Matthias Clasen [Fri, 7 Feb 2020 21:25:02 +0000 (16:25 -0500)]
gtk-demo: Don't call gtk_main_quit
It doesn't work with GtkApplications that do not
call gtk_main().
Matthias Clasen [Fri, 7 Feb 2020 20:42:32 +0000 (15:42 -0500)]
Adwaita: Fix selection in vertical spin buttons
This was broken by more specific selectors.
Matthias Clasen [Fri, 7 Feb 2020 19:23:55 +0000 (19:23 +0000)]
Merge branch 'patch-1' into 'master'
Update migrating-3to4.xml (fixed typo, in line 377)
See merge request GNOME/gtk!1398
J Arun Mani [Fri, 7 Feb 2020 18:30:42 +0000 (18:30 +0000)]
Update migrating-3to4.xml
Matthias Clasen [Fri, 7 Feb 2020 17:49:45 +0000 (12:49 -0500)]
label: Don't use gtk_widget_peek_style_context
We may just not have a style context. And we can just
as well go directly to the css styles.
Timm Bäder [Fri, 7 Feb 2020 04:09:10 +0000 (05:09 +0100)]
window: Move variable initialziation just before usage
Timm Bäder [Thu, 6 Feb 2020 16:32:26 +0000 (17:32 +0100)]
Rename gtk_widget{get,set,has}_style_class to _css_class
We want to use css instead of style everywhere now.
Timm Bäder [Wed, 5 Feb 2020 15:11:28 +0000 (16:11 +0100)]
treepopover: Fix header guard
Timm Bäder [Wed, 5 Feb 2020 07:08:45 +0000 (08:08 +0100)]
box: Move vfunc implementations before class_init
Just like we do everywhere else. This way we can also get rid of all the
prototypes.
Timm Bäder [Fri, 7 Feb 2020 03:32:08 +0000 (04:32 +0100)]
calendar: Remove day-selected-double-click signal
It doesn't really make sense to treat double clicks here different than
single clicks (and is bad UX), and it also breaks switching months by
quickly trying to single-click the last/first days in the calendar.
Timm Bäder [Wed, 5 Feb 2020 08:24:31 +0000 (09:24 +0100)]
calendar: Remove an unused enum
Timm Bäder [Wed, 5 Feb 2020 08:23:45 +0000 (09:23 +0100)]
calendar: Remove month-changed signal
Listen to notify::month instead.
Timm Bäder [Wed, 5 Feb 2020 08:22:21 +0000 (09:22 +0100)]
calendar: Keep a GDateTime around
Instead of a year/month/day triple.
Timm Bäder [Tue, 4 Feb 2020 14:20:39 +0000 (15:20 +0100)]
calendar: Return a GDateTime from get_date()
Timm Bäder [Tue, 4 Feb 2020 13:38:19 +0000 (14:38 +0100)]
calendar: Use GDateTime to select days
Timm Bäder [Tue, 4 Feb 2020 13:03:17 +0000 (14:03 +0100)]
calendar: Use widgets for everything
Timm Bäder [Tue, 4 Feb 2020 11:29:54 +0000 (12:29 +0100)]
calendar: Try to avoid changing size when changing the year
Timm Bäder [Tue, 4 Feb 2020 11:24:32 +0000 (12:24 +0100)]
calendar: Remove spinning code
This is dead code
Timm Bäder [Tue, 4 Feb 2020 11:19:08 +0000 (12:19 +0100)]
calendar: Add accessors for display properties
Instead of having a display flags enum and bitfield, just add proper
accessors for the properties, which is what we do everywhere else.
Timm Bäder [Tue, 4 Feb 2020 10:10:11 +0000 (11:10 +0100)]
testcalendar: Remove unused function
Timm Bäder [Tue, 4 Feb 2020 09:01:58 +0000 (10:01 +0100)]
calendar: Remove details
This is an unused feature that's way too complicated for a default
calendar widget and complicates the implementation a lot. Since we want
to eventually replace this with actual widgets, remove the details
support now.
Timm Bäder [Mon, 3 Feb 2020 11:06:26 +0000 (12:06 +0100)]
calendar: Fix an uninitialized value
Values pased to gtk_widget_measure must be initialized to 0. This failed
if the header widget of the calendar was invisible.
Timm Bäder [Tue, 4 Feb 2020 08:44:03 +0000 (09:44 +0100)]
Adwaita: Fix levelbar styling
The block nodes are inside a trough node.
Timm Bäder [Mon, 3 Feb 2020 10:43:15 +0000 (11:43 +0100)]
{box,grid}layout: Access border spacing directly
Instead of going through the style context
Timm Bäder [Sun, 2 Feb 2020 12:21:36 +0000 (13:21 +0100)]
GskTransform: Remove useless fmod check
All angles are in the [0; 360[ range
Timm Bäder [Sun, 2 Feb 2020 12:20:40 +0000 (13:20 +0100)]
GskTransform: add assertions to make normalize_angle() intentions clear
360deg should be expressed as 0deg and no angle should ever be
negative.
Timm Bäder [Fri, 31 Jan 2020 16:45:37 +0000 (17:45 +0100)]
snapshot: Remove new_with_parent
Unneeded now that we have push_collect()/pop_collect()
Timm Bäder [Fri, 31 Jan 2020 16:43:31 +0000 (17:43 +0100)]
textlayout: Use gtk_snapshot_{push,pop}_collect()
Timm Bäder [Fri, 31 Jan 2020 16:08:17 +0000 (17:08 +0100)]
GskRoundedRect: Inline graphene_rect_contains_rect
Brings gsk_rounded_rect_contains_rect down from 0.54% to 0.14% when
rendering rounded backgrounds.
Timm Bäder [Fri, 31 Jan 2020 07:08:11 +0000 (08:08 +0100)]
widget: Use gtk_snapshot_{push,pop})_collect
So we avoid allocating a new snapshot just for that.
Timm Bäder [Fri, 31 Jan 2020 07:05:34 +0000 (08:05 +0100)]
snapshot: Add _push_collect() and _pop_collect()
These will replace the previous gtk_snapshot_new_with_parent(), which
allocated an entirely new GObject just to push()/pop() some state. This
is already a problem but will be more important in the future as we
start using this more.
Timm Bäder [Wed, 29 Jan 2020 11:11:39 +0000 (12:11 +0100)]
Start using GtkWidget's new style class API
Timm Bäder [Wed, 29 Jan 2020 09:40:10 +0000 (10:40 +0100)]
renderborder: Make simple border case more obvious
When reaching this point, it is impossible that all border styles are
HIDDEN or NONE, but up to 3 of them can still be that style. In any
case, the "none or solid" border style is the most common on there is,
so try to make this simpler here by just appending a border node
directly instead of going through the snapshot_border path.
Timm Bäder [Wed, 29 Jan 2020 09:34:28 +0000 (10:34 +0100)]
Move GTK_BORDER_STYLE_HIDDEN before GTK_BORDER_STYLE_SOLID
The simple case when drawing border is "solid or nothing", which we can
now check for as simple as "style <= GTK_BORDER_STYE_SOLID".
Timm Bäder [Mon, 27 Jan 2020 13:22:20 +0000 (14:22 +0100)]
testcalendar: Close window properly
Timm Bäder [Tue, 28 Jan 2020 12:51:56 +0000 (13:51 +0100)]
searchbar: Use proper getter in _get_property()
Instead of retuning a seemingly random boolean, just use
gtk_search_bar_get_search_mode().
Timm Bäder [Tue, 28 Jan 2020 12:51:04 +0000 (13:51 +0100)]
searchbar: Use g_object_notify_by_pspec
We already keep the pspecs around, so use them.
Timm Bäder [Tue, 28 Jan 2020 07:42:08 +0000 (08:42 +0100)]
progressbar: Remove a few unneeded queue_resize() calls
This will happen automatically when adding style classes, setting the
label text, etc.
Timm Bäder [Wed, 5 Feb 2020 14:10:30 +0000 (15:10 +0100)]
Window: inline function into only caller
Timm Bäder [Fri, 31 Jan 2020 15:39:12 +0000 (16:39 +0100)]
widget: Fix a from_string/try_string mixup